package cn.edu.uestc.cwdsj.dao.i;

import cn.edu.uestc.cwdsj.dao.IXCodeMapDao;
import cn.edu.uestc.cwdsj.domain.XCodeMap;
import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class XCodeMapDao implements IXCodeMapDao {
    @Resource
    private HibernateTemplate hibernateTemplate;

    @Override
    public List<XCodeMap> getList() {
        return (List<XCodeMap>) hibernateTemplate.find("FROM " + XCodeMap.class.getSimpleName());
    }
}
